package db.entity;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the padlife database table.
 * 
 */
@Embeddable
public class PadLifePK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

    @Temporal( TemporalType.TIMESTAMP)
	private java.util.Date startLife;

	private String stationName;

    public PadLifePK() {
    }
	public java.util.Date getStartLife() {
		return this.startLife;
	}
	public void setStartLife(java.util.Date startLife) {
		this.startLife = startLife;
	}
	public String getStationName() {
		return this.stationName;
	}
	public void setStationName(String stationName) {
		this.stationName = stationName;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof PadLifePK)) {
			return false;
		}
		PadLifePK castOther = (PadLifePK)other;
		return 
			this.startLife.equals(castOther.startLife)
			&& this.stationName.equals(castOther.stationName);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.startLife.hashCode();
		hash = hash * prime + this.stationName.hashCode();
		
		return hash;
    }
}